package com.uidp.hibernatelayer;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.HibernateVO;

/**
 * Modul generated by hbm2java
 */
@Entity
@Table(name = "modul", catalog = "uidpdb")
public class ModulVO extends HibernateVO {
	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -8157650122106312021L;
	private Integer id;
	private String modulname;
	private String description;
	private List<AttributeDataVO> attributeDatas ;
	private List<ModulModulElementsVO> modulModulElementses ;
	private List<ModulUsergroupsVO> modulUsergroupses ;

	// Constructors

	/** default constructor */
	public ModulVO() {
		this.attributeDatas = new ArrayList<AttributeDataVO>();
		this.modulModulElementses = new ArrayList<ModulModulElementsVO>();
		this.modulUsergroupses = new ArrayList<ModulUsergroupsVO>();
	}

	/** minimal constructor */
	public ModulVO(String modulname) {
		this.modulname = modulname;
	}

	/** full constructor */
	public ModulVO(String modulname, String description,
			List<AttributeDataVO> attributeDatas,
			List<ModulModulElementsVO> modulModulElementses,
			List<ModulUsergroupsVO> modulUsergroupses) {
		this.modulname = modulname;
		this.description = description;
		this.attributeDatas = attributeDatas;
		this.modulModulElementses = modulModulElementses;
		this.modulUsergroupses = modulUsergroupses;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "modulname", nullable = false, length = 50)
	public String getModulname() {
		return this.modulname;
	}

	public void setModulname(String modulname) {
		this.modulname = modulname;
	}

	@Column(name = "description", length = 150)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "modul")
	public List<AttributeDataVO> getAttributeDatas() {
		return this.attributeDatas;
	}

	public void setAttributeDatas(List<AttributeDataVO> attributeDatas) {
		this.attributeDatas = attributeDatas;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "modul")
	public List<ModulModulElementsVO> getModulModulElementses() {
		return this.modulModulElementses;
	}

	public void setModulModulElementses(
			List<ModulModulElementsVO> modulModulElementses) {
		this.modulModulElementses = modulModulElementses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "modul")
	public List<ModulUsergroupsVO> getModulUsergroupses() {
		return this.modulUsergroupses;
	}

	public void setModulUsergroupses(List<ModulUsergroupsVO> modulUsergroupses) {
		this.modulUsergroupses = modulUsergroupses;
	}

	@Override
	public void setId(Object id) {
		// TODO Auto-generated method stub

	}

}
